/**
 * @Author Zys
 * @Description 随访js   (切换方法)
 * @Date 2019/8/29 16:16
 * @Param
 * @return
 **/


$(".head_img").bind('click', function() {
    let code = $(".head_img").attr("isShow");
    if(code === "1") {isCode1();}
    else {isCode2();}
});

/**
 * @Author Zys
 * @Description 切换菜单
 * @Date 2019/9/2 15:56
 * @Param
 * @return
 **/

let isCode1 = function() {
    let i =  $(".head_img");i.hide();$(".head_commit").hide();let j =$("#menuIcon");j.remove();let m = $("#mobileMenu");
    i.attr("isShow", "2");m.before("<i class=\"fa fa-times\" id=\"menuIcon\" aria-hidden=\"true\"></i>");
    $(".head").animate({
        height: ""+$(window).height()+"px",
        opacity: '0.5'
    }, 'slow', function() {});
    $(".head_span").fadeOut();$(".neck").show();$("#mobileForm").hide();i.show();
};

/**
 * @Author Zys
 * @Description 切换没有菜单样式方法
 * @Date 2019/9/2 15:55
 * @Param 
 * @return
 **/
let isCode2 = function() {
    let i =  $(".head_img");i.hide();$(".head_commit").show();let j =$("#menuIcon");j.remove();let m = $("#mobileMenu");
    i.attr("isShow", "1");m.before("<i class=\"fa fa-navicon\" id=\"menuIcon\" aria-hidden=\"true\"></i>");
    $(".head").animate({
        height: '3rem',
        opacity: '1'
    }, 'slow', function() {});
    $(".head_span").fadeIn();$(".neck").hide();$("#mobileForm").show();i.show();
};

/**
 * @Author Zys
 * @Description 点击导航栏
 * @Date 2019/9/2 15:55
 * @Param 
 * @return
 **/
$(".neck_span").bind('click', function() {
    let num = $(this).attr("num");$(".neck_span").removeClass("mobile_choose");$(this).addClass("mobile_choose");
    $(".content").hide();$(".content"+num+"").show();isCode2();});